#pragma once
#include "Bullet.h"
#include <vector>
#include <queue>
#include "GameTime.h"
using namespace std;

class Toolbullet
{
	vector<Bullet*> m_FrameBullet;
	queue<Bullet*> m_giveBullet;

	GameTime *m_gameTime;

	int m_X;
	int m_Y;
	ShootDirection m_shootDirect;
	Auto m_Auto;
	TypeMove m_TypeMove;
	float m_Speed;


	IDImage m_TypeGun;
	float TimeAnimation;

	void Shoot_SpreadGun();
	void Shoot_MachineGun();
public:
	Toolbullet(int CountBullet, float timetolive, float speed = 0.0f);
	void setGun(IDGun);
	void InitBullet(float x, float y, int width, int height, int GunPositionX, int GunPositionY, SpriteEffect flip, ShootDirection, TypeMove type);
	void Shoot();
	void Draw(LPD3DXSPRITE SpriteHandle, int vpx);
	void UpdateVeclocity();
	void Update();
	~Toolbullet();
};

